Field of the Invention
The present invention relates to an image processing apparatus and method for performing color-shift correction processing of image data.
Description of the Related Art
A color scanner is known as an image reading apparatus that reads an image by switching different emission wavelengths of light. Such a color scanner includes a carriage that is movable in a predetermined direction and equipped with a lighting device and an image sensor, which are line-shaped. The light source of the lighting device is LEDs that are capable of illuminating at emission wavelengths corresponding to Red (R), Green (G), and Blue (B) light. An original is read by the line-shaped image sensor receiving reflected light from the original while the carriage is moved in a direction (hereinafter referred to as a sub-scanning direction) crossing the longitudinal direction of the line-shaped lighting device. A moving reading method is used as a method for reading an original.
The moving reading method as referred to herein is a reading method in which light-source LEDs are switched while a CIS (Contact Image Sensor) unit is transported in the sub-scanning direction. Specifically, a red LED is lighted to obtain the R component of a color image, then a green LED is lighted to obtain the G component, and finally a blue LED is lighted to obtain the B component. A single line of image data is obtained in a single cycle of lighting those red, green, and blue LEDs. Accordingly, a single page of image data is obtained by repeating the lighting cycle while transporting the CIS unit in the sub-scanning direction.
However, color shifts occur with such moving reading where the RGB LEDs are lighted sequentially. Color shifts are described below with reference to the drawings. FIG. 7 illustrates how color shifts occur. A description is given of a case where an original whose color changes in the order of white, black, and white is read in the sub-scanning direction. Assume that the RGB light sources are lighted at times as shown in FIG. 7 when reading the original while transporting the CIS unit in the sub-scanning direction. When reading a region 1, the RGB read value is white (255, 255, 255) because the RGB light sources illuminate a white area of the original and the reflected light enters the sensor. Similarly, when reading a region 3, the RGB read value is black (0, 0, 0). When reading a region 2 that includes an edge where the color changes from white to black, the G light source illuminates both white and black areas of the original. In this case, the read value for G is an intermediate value of the values of white and black and accordingly the RGB read value is orange (255, 128, 0). Meanwhile, when reading a region 4 that includes an edge where the color changes from black to white, the RGB read value is blue (0, 128, 255).
As described above, in the method for sequentially activating the light sources in the order of R, G, and B, a color-shifted pixel with a warm chromatic color is generated on the upstream side, in the sub-scanning direction, of an edge where the color changes from white to black, whereas a color-shifted pixel with a cool chromatic color is generated on the downstream side of the edge. As a method for reducing such color shifts, a method is known in which a pattern is used to recognize an edge portion of white and black, and when the pattern is matched, a color-shifted pixel is replaced by black or white (Japanese Patent Laid-Open No. 4-280575). A method is also known in which a color shift is detected at an edge portion and a color-shifted pixel is corrected to an achromatic color pixel (Japanese Patent Laid-Open No. 2004-96625). Still another method is known in which a portion where luminance increases or decreases monotonously is determined to be a color-shifted pixel and the saturation of the color-shifted pixel is corrected (Japanese Patent Laid-Open No. 2006-42267).
Here, there is a phenomenon that higher reading resolution increases the number of chromatic color pixels generated due to color shifts. This is described below with reference to the drawings. FIG. 6 illustrates an edge where the color changes from white to black, as viewed through a lens. The Y axis indicates luminance value, and the X axis indicates position. As viewed through the lens, blurring occurs at an edge portion of white and black where the color gradually changes from white to black. It is well-known that such blurring is caused by aberration.
As shown in FIG. 6, a description is given of a case where a single pixel is blurred at 300 dpi. If an image is read at 300 dpi through a lens causing such blurring, a single pixel is blurred. At 600 dpi, which is double the resolution of 300 dpi, two pixels are blurred. Similarly, at 1200 dpi, which is double the resolution of 600 dpi, four pixels are blurred. In this way, higher reading resolution increases the number of blurred pixels to be generated. Additionally, as described above, chromatic color pixels are generated at edge portions due to the phenomenon caused by color shifts. In other words, it can be seen that higher resolution widens the range of chromatic color pixels occupying an edge portion.
Similarly to the example of resolution, the range occupied by chromatic color pixels due to color shifts can also be widened depending on the type of originals. For example, printed matter printed by an inkjet printer lacks sharpness of edges. There are various causes of this, and with reference to FIG. 5, the influence of the circular shape of main droplets 501 and the influence of satellites 502 (separate ink droplets) as sub-droplets and splashes 503 (ink splashing) are known, for example. That is, blurring occurs during reading because an original edge portion is not in the form of a straight line due to the main droplets 501. Additionally, the satellites 502 and the splashes 503 form small dots away from an edge, which widens the range of blurring to be read.
As described above, originals printed by an inkjet system have a tendency to have more blurred edges than those printed by offset printing or silver halide-based photography. Such an expanded range of edge blurring also results in the expansion of the range of chromatic color pixels due to color shifts.
If the range of chromatic color pixels expands at an edge portion, color shift correction of a single pixel is not enough for correction. Also, in the case of color shift correction based on pattern recognition, enormous amounts of memory are consumed because of the expansion of the range of memory that needs to be registered as patterns.